put zbrowser ("INDEX", field wordNum1, field indexLines, field maxIndexSampleCount, field indexCountWidth, field indexKeyWidth,field keyFileRefNum, field ptrFileRefNum, field subspaceHandle) into field IndexField1
else if numArg is 2 then
put zbrowser ("INDEX", field wordNum2, field indexLines, field maxIndexSampleCount, field indexCountWidth, field indexKeyWidth,field keyFileRefNum, field ptrFileRefNum, field subspaceHandle) into field IndexField2
else
beep
answer "browse INDEX error!"
exit to HyperCard
end if
else if toDo is "CONTEXT" then
put zbrowser ("CONTEXT", field instanceNum, field contextLines, numArg, field contextLineLength, field contextWordOffset, field maxContextLinesSkipped, field ptrFileRefNum, field textFileRefNum, field subspaceHandle) into field contextField
end if
end browse
on formatTextField textItem
put number of lines in textItem into textItemLines
put line textItemLines of textItem into textLastLine
put word 1 of textLastLine into field textStart
put word 2 of textLastLine into field textTarget
put word 3 of textLastLine into field textEnd
put line 1 to (textItemLines - 1) of textItem into field textField
end formatTextField
-- part 1 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=366 top=273 right=295 bottom=508
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 0
-- text size: 14
-- style flags: 8192
-- line height: 18
-- part name: Index
----- HyperTalk script -----
on mouseUp
lock screen
hide background button contextLineButton
hide field ContextField
hide background button textLineButton
hide background button "Find Selection"
hide background button "Move Up in Text"
hide background button "Move Down in Text"
hide field TextField
unlock screen with iris close
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=367 top=299 right=320 bottom=437
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 0
-- text size: 12
-- style flags: 8192
-- line height: 16
-- part name: Context
----- HyperTalk script -----
on mouseUp
lock screen
show field contextField
show background button contextLineButton
if the visible of field textField is true then
hide background button textLineButton
hide background button "Find Selection"
hide background button "Move Up in Text"
hide background button "Move Down in Text"
hide field textField
unlock screen with iris close
else
unlock screen with iris open
end if
end mouseUp
-- part 3 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=439 top=299 right=320 bottom=509
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 0
-- text size: 14
-- style flags: 8192
-- line height: 18
-- part name: Text
----- HyperTalk script -----
on mouseUp
lock screen
show field contextField
show background button contextLineButton
show field textField
show background button textLineButton
show background button "Find Selection"
show background button "Move Up in Text"
show background button "Move Down in Text"
unlock screen with iris open
end mouseUp
-- part 4 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=367 top=324 right=339 bottom=411
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Menu
----- HyperTalk script -----
on mouseUp
visual effect iris close to black
visual effect iris close
go to first card
end mouseUp
-- part 5 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=415 top=324 right=339 bottom=460
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Notes
----- HyperTalk script -----
on mouseUp
push this card
visual effect dissolve
go to card TEXNotes
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=465 top=324 right=339 bottom=509
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Home
----- HyperTalk script -----
on mouseUp
go home
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=235 top=20 right=34 bottom=250
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index1scrollUp
----- HyperTalk script -----
on mouseDown
checkOpenDataspace
subtract 1 from field wordNum1
if field wordNum1 < 0 then put 0 into field wordNum1
browse "INDEX", 1
end mouseDown
on mouseStillDown
checkOpenDataspace
subtract 2 from field wordNum1
if field wordNum1 < 0 then put 0 into field wordNum1
browse "INDEX", 1
end mouseStillDown
-- part 8 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=235 top=35 right=133 bottom=250
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index1pageUp
----- HyperTalk script -----
on mouseDown
checkOpenDataspace
subtract (field indexLines - 1) from field wordNum1
if field wordNum1 < 0 then put 0 into field wordNum1
browse "INDEX", 1
end mouseDown
on mouseStillDown
checkOpenDataspace
subtract (field indexLines - 1) from field wordNum1
if field wordNum1 < 0 then put 0 into field wordNum1
browse "INDEX", 1
end mouseStillDown
-- part 9 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=235 top=134 right=148 bottom=250
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index1jump
----- HyperTalk script -----
on mouseUp
checkOpenDataspace
ask "Word to jump to?"
put line 1 of zbrowser ("LOCATE", It, field keyFileRefNum) into field wordNum1
browse "INDEX", 1
end mouseUp
-- part 10 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=235 top=149 right=247 bottom=250
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index1pageDown
----- HyperTalk script -----
on mouseDown
checkOpenDataspace
if line (2 * field indexLines) of field indexField1 <> empty then
add (field indexLines - 1) to field wordNum1
browse "INDEX", 1
end if
end mouseDown
on mouseStillDown
checkOpenDataspace
if line (2 * field indexLines) of field indexField1 <> empty then
add (field indexLines - 1) to field wordNum1
browse "INDEX", 1
end if
end mouseStillDown
-- part 11 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=235 top=247 right=261 bottom=250
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index1scrollDown
----- HyperTalk script -----
on mouseDown
checkOpenDataspace
if line (2 * field indexLines) of field indexField1 <> empty then
add 1 to field wordNum1
browse "INDEX", 1
end if
end mouseDown
on mouseStillDown
checkOpenDataspace
if line (2 * field indexLines) of field indexField1 <> empty then
add 2 to field wordNum1
browse "INDEX", 1
end if
end mouseStillDown
-- part 12 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=491 top=20 right=34 bottom=506
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index2andContextScrollUp
----- HyperTalk script -----
on mouseDown
checkOpenDataspace
if the visible of field contextField is true then
--scroll contextField
browse "CONTEXT", 2
put word 1 of line (field contextLines + 1) of field contextField into field instanceNum
else
--scroll indexField2
subtract 1 from field wordNum2
if field wordNum2 < 0 then put 0 into field wordNum2
browse "INDEX", 2
end if
end mouseDown
on mouseStillDown
checkOpenDataspace
--do accelerated scrolling, 2 lines at a jump
if the visible of field contextField is true then
--scroll contextField
browse "CONTEXT", 3
put word 1 of line (field contextLines + 1) of field contextField into field instanceNum
else
--scroll indexField2
subtract 2 from field wordNum2
if field wordNum2 < 0 then put 0 into field wordNum2
browse "INDEX", 2
end if
end mouseStillDown
-- part 13 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=491 top=35 right=133 bottom=506
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index2andContextpageUp
----- HyperTalk script -----
on mouseDown
checkOpenDataspace
if the visible of field contextField is true then
--pageUp contextField
browse "CONTEXT", field contextLines
put word 1 of line (field contextLines + 1) of field contextField into field instanceNum
else
--pageUp indexField2
subtract (field indexLines - 1) from field wordNum2
if field wordNum2 < 0 then put 0 into field wordNum2
browse "INDEX", 2
end if
end mouseDown
on mouseStillDown
checkOpenDataspace
if the visible of field contextField is true then
--pageUp contextField
browse "CONTEXT", field contextLines
put word 1 of line (field contextLines + 1) of field contextField into field instanceNum
else
--pageUp indexField2
subtract (field indexLines - 1) from field wordNum2
if field wordNum2 < 0 then put 0 into field wordNum2
browse "INDEX", 2
end if
end mouseStillDown
-- part 14 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=492 top=134 right=148 bottom=507
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index2jump
----- HyperTalk script -----
on mouseUp
checkOpenDataspace
if the visible of field contextField is true then
ask "Lines (+/-) of context to jump?"
add It to field instanceNum
browse "CONTEXT", 1
else
ask "Word to jump to?"
put line 1 of zbrowser ("LOCATE", It, field keyFileRefNum) into field wordNum2
browse "INDEX", 2
end if
end mouseUp
-- part 15 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=491 top=149 right=247 bottom=506
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index2pageDown
----- HyperTalk script -----
on mouseDown
checkOpenDataspace
if the visible of field contextField is true then
--pageDown contextField
if word 2 of line (2 * field contextLines) of field contextField >= 0 then
put word 1 of line (2 * field contextLines) of field contextField into field instanceNum
browse "CONTEXT", 1
end if
else
--pageDown indexField2
if line (2 * field indexLines) of field indexField2 <> empty then
add (field indexLines - 1) to field wordNum2
browse "INDEX", 2
end if
end if
end mouseDown
on mouseStillDown
checkOpenDataspace
if the visible of field contextField is true then
--pageDown contextField
if word 2 of line (2 * field contextLines) of field contextField >= 0 then
put word 1 of line (2 * field contextLines) of field contextField into field instanceNum
browse "CONTEXT", 1
end if
else
--pageDown indexField2
if line (2 * field indexLines) of field indexField2 <> empty then
add (field indexLines - 1) to field wordNum2
browse "INDEX", 2
end if
end if
end mouseStillDown
-- part 16 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=491 top=247 right=261 bottom=506
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index2scrollDown
----- HyperTalk script -----
on mouseDown
checkOpenDataspace
if the visible of field contextField is true then
--scrollDown contextField
if word 2 of line (2 * field contextLines) of field contextField >= 0 then
put word 1 of line (2 + field contextLines) of field contextField into field instanceNum
browse "CONTEXT", 1
end if
else
--scrollDown indexField2
if line (2 * field indexLines) of field indexField2 <> empty then
add 1 to field wordNum2
browse "INDEX", 2
end if
end if
end mouseDown
on mouseStillDown
checkOpenDataspace
--do accelerated scrolling, two lines at a jump
if the visible of field contextField is true then
--scrollDown contextField
if word 2 of line (2 * field contextLines) of field contextField >= 0 then
put word 1 of line (3 + field contextLines) of field contextField into field instanceNum
browse "CONTEXT", 1
end if
else
--scrollDown indexField2
if line (2 * field indexLines) of field indexField2 <> empty then
add 2 to field wordNum2
browse "INDEX", 2
end if
end if
end mouseStillDown
-- part 19 (field)
-- low flags: 01
-- high flags: 0004
-- rect: left=21 top=19 right=264 bottom=235
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: IndexField1
----- HyperTalk script -----
on mouseUp
set cursor to watch
checkOpenDataspace
--compute line clicked on
put 1 + trunc((item 2 of the clickLoc - (second item of (the rectangle of field indexField1))) / (the textheight of field indexField1)) into clickedLine
if clickedLine > field indexLines then put field indexLines into clickedLine
if line (clickedline + field indexLines) of field indexField1 is empty then
beep
answer "Sorry, nothing to retrieve!"
exit to HyperCard
end if
if field subspaceHandle is not 0 and item 1 of the clickLoc <= (item 1 of the rect of background button index1line) then
--must toggle this word in subspace
--get leading character of count and see if it's 0
get char 1 of word 1 of (char 2 to (field indexCountWidth) of line clickedLine of field indexfield1)
if It is 0 then
--set bits for this word's neighborhood
put 1 into setOrClear
else
--clear bits for this word's neighborhood
put 0 into setOrClear
end if
get zbrowser ("SETSUBSPACEBITS", clickedLine + field wordNum1 - 1, field neighborhoodSize, setOrClear, field keyFileRefNum, field ptrFileRefNum, field subspaceHandle)
browse "INDEX", 1
browse "INDEX", 2
else
put line (clickedLine + field indexLines) of field indexField1 into field instanceNum
browse "CONTEXT", 1
send mouseUp to background button context
end if
end mouseUp
-- part 17 (button)
-- low flags: 00
-- high flags: 0002
-- rect: left=58 top=21 right=260 bottom=60
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index1line
-- part 20 (field)
-- low flags: 01
-- high flags: 0004
-- rect: left=277 top=19 right=264 bottom=491
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: IndexField2
----- HyperTalk script -----
on mouseUp
set cursor to watch
checkOpenDataspace
--compute line clicked on
put 1 + trunc((item 2 of the clickLoc - (second item of (the rectangle of field indexField2)))/(the textheight of field indexField2)) into clickedLine
if clickedLine > field indexLines then put field indexLines into clickedLine
if line (clickedline + field indexLines) of field indexField2 is empty then
beep
answer "Sorry, nothing to retrieve!"
exit to HyperCard
end if
if field subspaceHandle is not 0 and item 1 of the clickLoc <= (item 1 of the rect of background button index2line) then
--must toggle this word in subspace; test leading char of count
get char 1 of word 1 of (char 2 to (field indexCountWidth) of line clickedLine of field indexfield2)
if It is 0 then
--set bits for this word's neighborhood
put 1 into setOrClear
else
--clear bits for this word's neighborhood
put 0 into setOrClear
end if
get zbrowser ("SETSUBSPACEBITS", clickedLine + field wordNum2 - 1, field neighborhoodSize, setOrClear, field keyFileRefNum, field ptrFileRefNum, field subspaceHandle)
browse "INDEX", 2
browse "INDEX", 1
else
put line (clickedLine + field indexLines) of field indexField2 into field instanceNum
browse "CONTEXT", 1
send mouseUp to background button context
end if
end mouseUp
-- part 18 (button)
-- low flags: 00
-- high flags: 0002
-- rect: left=313 top=21 right=260 bottom=315
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index2line
-- part 21 (field)
-- low flags: 81
-- high flags: 0004
-- rect: left=1 top=19 right=264 bottom=491
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: ContextField
----- HyperTalk script -----
on mouseUp
set cursor to watch
checkOpenDataspace
--calculate line number of mouse click, then get the text
put 1 + trunc((item 2 of the clickLoc - (second item of (the rectangle of field ContextField))) / (the textheight of field ContextField)) into clickedLine
if clickedLine > field contextLines then put field contextLines into clickedLine
put word 2 of line (clickedLine + field contextLines) of field contextField into field textPtr
if field textPtr >= 0 then
formatTextField zbrowser ("TEXT",field textPtr, field textChunkSize, field textOffset,field textFileRefNum)
send mouseUp to background button text
find string (char field textTarget to (field textTarget + field contextLineLength) of field textField) in field textField
else
beep
answer "Sorry, no text to retrieve!"
end if
end mouseUp
-- part 23 (button)
-- low flags: 80
-- high flags: 0002
-- rect: left=211 top=21 right=260 bottom=213
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: contextLineButton
-- part 22 (field)
-- low flags: 80
-- high flags: 0007
-- rect: left=2 top=19 right=262 bottom=507
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: TextField
-- part 24 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=0 top=260 right=278 bottom=114
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: wordNum1
-- part 25 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=0 top=276 right=294 bottom=114
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: indexLines
-- part 26 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=0 top=292 right=310 bottom=114
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: maxIndexSampleCount
-- part 27 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=0 top=308 right=326 bottom=114
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: indexCountWidth
-- part 28 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=0 top=324 right=342 bottom=114
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: wordNum2
-- part 29 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=114 top=260 right=278 bottom=228
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: indexKeyWidth
-- part 30 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=114 top=276 right=294 bottom=228
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: keyFileRefNum
-- part 31 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=114 top=292 right=310 bottom=228
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: ptrFileRefNum
-- part 32 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=114 top=308 right=326 bottom=228
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: subspaceHandle
-- part 33 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=114 top=324 right=342 bottom=228
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: textFileRefNum
-- part 34 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=228 top=260 right=278 bottom=342
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: contextLines
-- part 35 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=228 top=276 right=294 bottom=342
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: contextLineLength
-- part 36 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=228 top=292 right=310 bottom=342
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: contextWordOffset
-- part 37 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=228 top=308 right=326 bottom=342
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: maxContextLinesSkipped
-- part 38 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=228 top=324 right=342 bottom=342
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: neighborhoodSize
-- part 39 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=342 top=260 right=278 bottom=456
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: textChunkSize
-- part 40 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=342 top=276 right=294 bottom=456
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: textOffset
-- part 46 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=342 top=292 right=310 bottom=456
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: instanceNum
-- part 47 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=342 top=308 right=326 bottom=456
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: textPtr
-- part 48 (button)
-- low flags: 80
-- high flags: 0002
-- rect: left=488 top=20 right=261 bottom=490
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: textLineButton
-- part 49 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=11 top=300 right=322 bottom=120
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Subspace
----- HyperTalk script -----
on mouseUp
set cursor to watch
checkOpenDataspace
if field subspaceHandle is 0 then
put zbrowser ("NEWSUBSPACE", field textFileRefNum) into field subspaceHandle
get zbrowser ("EMPTYSUBPACE", field subspaceHandle)
show background button Words
show background button Sentences
show background button Paragraphs
else
get zbrowser ("RELEASESUBSPACE", field subspaceHandle)
put 0 into field subspaceHandle
hide background button Words
hide background button Sentences
hide background button Paragraphs
end if
browse "INDEX", 1
browse "INDEX", 2
send mouseUp to background button Index
end mouseUp
-- part 51 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=10 top=273 right=295 bottom=119
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Open Dataspace
----- HyperTalk script -----
on mouseUp
if field subspaceHandle is not 0 then
get zbrowser ("RELEASESUBSPACE", field subspaceHandle)
put 0 into field subspaceHandle
hide background button Words
hide background button Sentences
hide background button Paragraphs
end if
get openCloseTEXfiles (field textFileRefNum, field keyFileRefNum, field ptrFileRefNum)
put 0 into field textFileRefNum
put 0 into field keyFileRefNum
put 0 into field ptrFileRefNum
get openCloseTEXfiles ( )
set cursor to watch
if It is empty then exit mouseUp
if char 1 of It is "{" then
answer It
exit mouseUp
end if
put word 1 of It into field textFileRefNum
put word 2 of It into field keyFileRefNum
put word 3 of It into field ptrFileRefNum
lock screen
put line 1 of zbrowser ("LOCATE", "A", field keyFileRefNum) into field wordNum1
put (line 1 of zbrowser ("LOCATE", "ZZZZZ", field keyFileRefNum)) - field indexLines + 1 into field wordNum2
browse "INDEX", 1
browse "INDEX", 2
send mouseUp to background button Index
end mouseUp
-- part 52 (button)
-- low flags: 80
-- high flags: 8003
-- rect: left=125 top=273 right=295 bottom=234
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Find Selection
----- HyperTalk script -----
on mouseUp
set cursor to watch
checkOpenDataspace
put word 1 of the selection into theSel
if theSel is empty then
beep
answer "Please highlight a word before clicking."
exit mouseUp
end if
put line 1 of zbrowser ("LOCATE", theSel, field keyFileRefNum) into field wordNum2
browse "INDEX", 2
send mouseUp to background button Index
end mouseUp
-- part 53 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=239 top=273 right=295 bottom=348
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Move Up in Text
----- HyperTalk script -----
on mouseUp
set cursor to watch
checkOpenDataspace
if field textStart is 0 then
beep
answer "Already at beginning of dataspace!"
exit mouseUp
end if
formatTextField zbrowser ("TEXT", field textStart-1, field textChunkSize, field textChunkSize, field textFileRefNum)
end mouseUp
-- part 54 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=239 top=300 right=322 bottom=348
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Move Down in Text
----- HyperTalk script -----
on mouseUp
set cursor to watch
checkOpenDataspace
if last line of field textField is "{end of dataspace}" then
beep
answer "Already at end of dataspace!"
exit mouseUp
end if
formatTextField zbrowser ("TEXT", field textEnd, field textChunkSize, 1, field textFileRefNum)
end mouseUp
-- part 55 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=342 top=324 right=342 bottom=456
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: textStart
-- part 56 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=398 top=260 right=278 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: textTarget
-- part 57 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=398 top=276 right=294 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: textEnd
-- part 61 (button)
-- low flags: 80
-- high flags: A006
-- rect: left=130 top=321 right=335 bottom=206
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Paragraphs
----- HyperTalk script -----
on mouseUp
if the hilite of me is true then
set the hilite of background button Words to false
set the hilite of background button Sentences to false
put 4800 into field neighborhoodSize
else
set the hilite of me to true
end if
end mouseUp
-- part 62 (button)
-- low flags: 80
-- high flags: A006
-- rect: left=63 top=321 right=335 bottom=130
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Sentences
----- HyperTalk script -----
on mouseUp
if the hilite of me is true then
set the hilite of background button Words to false
set the hilite of background button Paragraphs to false
put 480 into field neighborhoodSize
else
set the hilite of me to true
end if
end mouseUp
-- part 63 (button)
-- low flags: 80
-- high flags: E006
-- rect: left=7 top=321 right=335 bottom=63
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Words
----- HyperTalk script -----
on mouseUp
if the hilite of me is true then
set the hilite of background button Sentences to false
set the hilite of background button Paragraphs to false